<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="pragma" content="no-cache" />
	<link rel="stylesheet" href="/css/style.css" type="text/css"/>
	<script type="text/javascript" src="/js/jquery.js"></script>
	<script type="text/javascript" src="/js/util.js"></script>
</head>
<script type="text/javascript">
//////////////////////////////////////////////////////////////////////
////  email = "wenpin.qian@happyelements.com"                     ////
////  team = "Athene"                                             ////
////  warnings = "This is generated page,Do Not Modify!";         ////
////  tips = "Opera & IE not supported|Chrome & Safari sugguested"////
//////////////////////////////////////////////////////////////////////
var BattleEndConditionstr = window.dialogArguments;
var BattleEndCondition = null;
if(BattleEndConditionstr != undefined && BattleEndConditionstr != "" && BattleEndConditionstr != "{}") {
		BattleEndCondition = s2json(BattleEndConditionstr);
}
$(document).ready(function() {
	if(BattleEndCondition != undefined) {
	
	$('#type').val(BattleEndCondition.type);	
	$('#value').val(BattleEndCondition.value);		
	}
	listselectors();
});
window.returnValue = BattleEndConditionstr;

function listselectors() {
}

function submitBattleEndCondition() {
	window.returnValue = json2s({
			
			type:$('#type').val(),			
			value:$('#value').val(),						
	});
	beforeWindowClose();
	window.close();
}

function beforeWindowClose() {
	if(window.returnCallback) {
		window.returnCallback(window.returnValue);
	}
	window.onbeforeunload = null;
	return true;
}

</script>
<body onunload="beforeWindowClose()">
	<div class="addarea">
	<table>
		<tbody>			
				<tr>				<td>
					<label for="type">完成条件</label>
																	<select id="type" name="type">
							
								<option value="1">首领挂</option>
							
								<option value="2">超回合</option>
													</select>
									</td>
							
								<td>
					<label for="value">完成结果</label>
																	<select id="value" name="value">
							
								<option value="0">无</option>
							
								<option value="1">胜利</option>
							
								<option value="2">失败</option>
							
								<option value="3">平局</option>
													</select>
									</td>
				</tr>					</tbody>
	</table>
	</div>
	<input type="button" onclick="submitBattleEndCondition()" value="提交"/>
</body>